
(function(ns){

var Ycall = ns.Ycall = Hilo.Class.create({
    Extends: Hilo.Sprite,
    constructor: function(properties){
		//console.log(properties)
        Ycall.superclass.constructor.call(this, properties);
        this.addFrame(properties.atlas.getSprite('ycall'));
        this.interval = 3;
        this.pivotX = 0;
        this.pivotY = 0;
		this.loop = false;
		//this.background = "#000000";
    },
    startX: 0, //云的起始x坐标
    startY: 0, //云的起始y坐标
	scale:1,
	doNum:0,
    getReady: function(){
        //设置起始坐标
        this.x = this.startX;
        this.y = this.startY;
		this.scaleX = this.scale;
		this.scaleY = this.scale;
        this.play();
        //Hilo.Tween.to(this, {x:this.endX ,y:this.endY, rotation:this.endRot}, {duration:this.duration,ease:this.ease, reverse:true, loop:true});
    },
    onUpdate: function(){
        //console.log("yun")
		this.doNum++
		if(this.doNum/500==1){
			this.goto(0,false)
			this.doNum = 0
		}
		//console.log(this.doNum)
    }
});

})(window.game);